﻿using System.Windows.Forms;

namespace LogicProtocolAnalyzer
{
    public partial class TriggerLevel : UserControl
    {
        public TriggerLevel()
        {
            InitializeComponent();
        }

        internal int Channel
        {
            get { return int.Parse(labelChannel.Text) - 1; }
            set { labelChannel.Text = (value + 1).ToString(); }
        }

        internal Level Level
        {
            get { return radioButtonHigh.Checked ? Level.High : Level.Low; }
            set
            {
                radioButtonHigh.Checked = (value == Level.High) ? true : false;
                radioButtonLow.Checked = !radioButtonHigh.Checked;
            }
        }
    }
}
